package exception;

/**
 * Finally块
 */
public class FinallyDemo {
    public static void main(String[] args) {
        System.out.println("小程序开始了");
        try{   String str="wwff";
           // String str=null;
            System.out.println(str.length());
            return;
        }catch (Exception e){
            System.out.println("出现了异常");
        }finally {
            System.out.println("finally块执行了");
        }

        System.out.println("小程序结束了");
    }
}
